package cn.com.twoke.game.client.handler;

import cn.com.twoke.game.client.ui.UiManager;
import cn.com.twoke.game.client.ui.WindowUI;
import cn.com.twoke.game.common.entity.message.LogoutMessage;
import cn.com.twoke.game.common.handler.MessageHandler;

import javax.swing.*;
import java.io.IOException;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;

public class LogoutMessageHandler implements MessageHandler<LogoutMessage> {

    @Override
    public void handle(Selector selector, SocketChannel channel, LogoutMessage message) throws IOException {
        if (message.isState()) {
            System.exit(0);
        }
    }

}
